package persistence;

import persistence.util.ConnectionProvider;

public abstract class JdbcDAOBase {
	/* disadvantage of holding conProvider in here: 
	 * Parallel Production and Testing is not possible -> but testing is done locally only, so no problem 
	 */
	/*protected*/private static ConnectionProvider conProvider;
	
	/**
	 * needs to be called by subclasses, to provide them with a connection
	 */
	
	public JdbcDAOBase() {}

	public static ConnectionProvider getConProvider() {
		return conProvider;
	}

	public static void setConProvider(ConnectionProvider _conProvider) {
		conProvider = _conProvider;
	}	
	
//	/**
//	 * for convenience: needs to be implemented by subclasses to allow easier assembling
//	 * in TestFactory --> cancelled, so that DAOs may be replaced step by step by a 
//	 * different implementation -> harder to do, if concrete dependent DAO types are used in JdbcImpl
//	 */
//	abstract void setConProviderForDAOs();
}
